package com.example.grpcclient.controller;

import com.example.grpcclient.Service.HelloGrpcClientServerImpl;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author 赵云龙
 * @Date 2020/6/21
 * @Description TODO
 */

@RestController
public class GrpcClientController {

    @Resource
    HelloGrpcClientServerImpl helloGrpcClientServer;

    @GetMapping("/")
    public String getMessaged(@RequestParam(defaultValue = "zhaoyunlong") String name) {
        return helloGrpcClientServer.sendMessage(name);
    }

}
